package com.yanqu.road.server.cmd.orewar;

import com.yanqu.road.pb.orewar.OreWarProto;
import com.yanqu.road.server.cmd.CrossCommand;
import com.yanqu.road.server.cmd.CrossUnionCommand;
import com.yanqu.road.server.command.Cmd;
import com.yanqu.road.server.manager.orewar.CrossOreWarMgr;
import com.yanqu.road.message.YanQuMessage;
import com.yanqu.road.server.protocol.Protocol;


@Cmd(code = Protocol.C_CROSS_ORE_WAR_GET_STATION, desc = "获取玩家的坑位简略信息")
public class CrossGetStationCmd extends CrossUnionCommand {

    private int activityId;

    private int stationId;

    @Override
    public boolean parseData(YanQuMessage packet) throws Exception {
        OreWarProto.CrossGetStationMsg reqMsg = OreWarProto.CrossGetStationMsg.parseFrom(packet.getBytes());
        activityId = reqMsg.getActivityId();
        stationId = reqMsg.getStationId();
        return true;
    }

    @Override
    public void execute(YanQuMessage packet) throws Exception {
        CrossOreWarMgr.syncStation(activityId,serverId,stationId,groupId);
    }

    @Override
    public void sendData() {

    }

}
